//主数据表格配置（医院端用后结算）
export const columns1 =  [
  { title:'结算单号', dataIndex:'settlementNo', key: 'settlementNo', align: 'center',scopedSlots: { customRender: 'settlementNo' } },
  // { title: '采购单位', dataIndex: 'customerName', key: 'customerName', align: 'center' },
  { title: '供应商名称', dataIndex: 'supplierName', key: 'supplierName', align: 'center' },
  // { title: '结算金额无税总价', dataIndex: 'totalIunitprice', key: 'totalIunitprice',align: 'center'  },
  { title: '结算金额含税总价', dataIndex: 'totalPrice', key: 'totalPrice', align: 'center',scopedSlots: { customRender: 'toFixed2' } },
  // { title: '税率', dataIndex: 'tax', key: 'tax', align: 'center'  },
  // { title: '税额', dataIndex: 'taxes', key: 'taxes', align: 'center'  },
  { title: '发票类型', dataIndex: 'invoiceType', key: 'invoiceType', align: 'center' },
  { title: '开票信息', dataIndex: 'invoiceInfo', key: 'invoiceInfo', align: 'center' },
  { title: '发票状态', dataIndex: 'invoiceState', key: 'invoiceState', align: 'center' },
  // { title: '采购单位备注', dataIndex: 'remarker', key: 'remarker', align: 'center' },
  { title: '结算状态', dataIndex: 'settlementState', key: 'settlementState', align: 'center' },
  {
    title: '操作',
    dataIndex: 'action', 
    key: 'operation',
    width: 180,
    align: 'center',
    scopedSlots: { customRender: 'action' }
  }
]
//主数据表格配置（供应商货票同行）
export const columns2 =  [
  { title:'配送单号', dataIndex:'deliveryOrderNo', key: 'deliveryOrderNo', align: 'center',scopedSlots: { customRender: 'deliveryOrderNo' } },
  { title: '结算类型', dataIndex: 'settlementType', key: 'settlementType', align: 'center' },
  { title: '客户名称', dataIndex: 'customerName', key: 'customerName', align: 'center' },
  { title: '配送数量', dataIndex: 'settlementNum', key: 'settlementNum',align: 'center'  },
  { title: '已开票数量', dataIndex: 'invoiceNum', key: 'invoiceNum', align: 'center' },
  { title: '配送单金额', dataIndex: 'totalPrice', key: 'totalPrice', align: 'center',scopedSlots: { customRender: 'toFixed2' } },
  { title: '已开票金额', dataIndex: 'invoicetAmount', key: 'invoicetAmount', align: 'center',scopedSlots: { customRender: 'toFixed2' } },
  {
    title: '操作',
    dataIndex: 'action', 
    key: 'operation',
    width: 180,
    align: 'center',
    scopedSlots: { customRender: 'action' }
  }
]
//主数据表格配置（供应商用后结算）
export const columns3 =  [
  { title:'结算单号', dataIndex:'settlementNo', key: 'settlementNo', align: 'center',scopedSlots: { customRender: 'settlementNo' } },
  // { title: '采购单位', dataIndex: 'customerName', key: 'customerName', align: 'center' },
  { title: '客户名称', dataIndex: 'customerName', key: 'customerName', align: 'center' },
  // { title: '结算金额无税总价', dataIndex: 'totalIunitprice', key: 'totalIunitprice',align: 'center'  },
  { title: '结算金额含税总价', dataIndex: 'totalPrice', key: 'totalPrice', align: 'center' },
  // { title: '税率', dataIndex: 'tax', key: 'tax', align: 'center'  },
  // { title: '税额', dataIndex: 'taxes', key: 'taxes', align: 'center'  },
  { title: '发票类型', dataIndex: 'invoiceType', key: 'invoiceType', align: 'center' },
  { title: '开票信息', dataIndex: 'invoiceInfo', key: 'invoiceInfo', align: 'center' },
  { title: '发票状态', dataIndex: 'invoiceState', key: 'invoiceState', align: 'center' },
  // { title: '采购单位备注', dataIndex: 'remarker', key: 'remarker', align: 'center' },
  { title: '结算状态', dataIndex: 'settlementState', key: 'settlementState', align: 'center' },
  {
    title: '操作',
    dataIndex: 'action', 
    key: 'operation',
    width: 180,
    align: 'center',
    scopedSlots: { customRender: 'action' }
  }
]
//主数据明细columns
export const columnsDetail=[]

//主数据查询配置（医院端用后结算）
export const q_formInfos1 = [
  // { label: '结算单号', name: 'pid', type: 'settlementSelect', placeholder: '结算单号' },
  { label: '结算单号', name: 'settlementNo', type: 'input', placeholder: '结算单号' },
  { label: '供应商名称',name: 'supplierOrgPid',type: 'supplier',placeholder: '供应商名称'},
  { label: '发票类型', name: 'invoiceType', type: 'dicselect',dicName:'invoiceType', placeholder: '发票类型' },
  { label: ['查询', '重置'], type: 'botton' }
]
//主数据查询配置（供应商）
export const q_formInfos2 = [
  { label: '结算单号', name: 'settlementNo', type: 'input', placeholder: '结算单号' },
  { label: '采购单位',name: 'customerPid',type: 'customer',placeholder: '采购单位'},
  { label: '发票类型', name: 'invoiceType', type: 'dicselect',dicName:'invoiceType', placeholder: '发票类型' },
  { label: ['查询', '重置'], type: 'botton' }
]
export const q_formDatas = {
  customerPid:null,
  pid: null,
  settlementNo:null,
  supplierOrgPid:null,
  invoiceType: null
}

//添加主数据表单配置
export const s_FormInfo = [
  { label: '结算单号', name: 'settlementNo', type: 'input', placeholder: '系统生成' },
  // { label: '采购单位', name: 'customerName', type: 'input', placeholder: '请输入采购单位' },
  { label: '供应商名称', name: 'supplierOrgPid', type: 'supplier', placeholder: '请选择供应商名称' },
  { label: '结算金额无税总价', name: 'totalIunitprice', type: 'input', placeholder: '请输入结算金额无税总价' },
  { label: '结算金额含税总价', name: 'totalPrice', type: 'input', placeholder: '请输入结算金额含税总价' },
  { label: '税率', name: 'tax', type: 'dicselect',dicName:'tax', placeholder: '请选择税率' },
  { label: '税额', name: 'taxes', type: 'input', placeholder: '请输入税率' },
  { label: '发票类型', name: 'invoiceType', type: 'dicselect',dicName:'invoiceType', placeholder: '发票类型' },
  { label: '开票信息', name: 'invoiceInfo', type: 'textarea', placeholder: '请输入开票信息' },
  // { label: '发票状态', name: 'invoiceState', type: 'input', placeholder: '请输入发票状态' },
  { label: '采购单位备注', name: 'remarker', type: 'textarea', placeholder: '请输入采购单位备注' },
  { label: ['保存', '重置'], type: 'botton' }
]
export const s_formDatas = {
  sysSeq: null,
  pid: null,
  settlementNo: null,
  supplierOrgPid: null,
  supplierName: null,
  totalIunitprice:null,
  totalPrice:null,
  tax:null,
  taxes:null,
  invoiceType: null,
  invoiceInfo: null,
  invoiceState: null,
  settlementState: null,
  remarker: null,
}
export const s_rules = {
  invoiceType: [{ required: true, message: '发票类型必填', trigger: 'blur' }],
  supplierName: [{ required: true, message: '供应商名称必选', trigger: 'blur' }],
  totalIunitprice: [{ required: true, message: '结算金额无税总价必填', trigger: 'change' }],
  totalPrice: [{ required: true, message: '结算金额含税总价必填', trigger: 'change' }],
}

//查看明细显示配置
export const infoDatas = [
  // { title: '数据有效区域', id: 'areaUse', value: '' },
  { title: '平台编码', id: 'code', value: '' },
  { title: 'EDI编码', id: 'ediCode', value: '' },
  { title: '编码', id: 'standardCode', value: '' },
  { title: '医保代码', id: 'medicareCode', value: '' },
  { title: '省医保代码', id: 'medicareCode2', value: '' },
  { title: '市医保代码', id: 'medicareCode3', value: '' },
  { title: '一级分类（学科、品类）', id: 'first', value: '' },
  { title: '二级分类（用途、品目）', id: 'second', value: '' },
  { title: '三级分类（部位、功能、品种）', id: 'third', value: '' },
  { title: '品名', id: 'productNameZh', value: '' },
  { title: '英文名称', id: 'productNameEn', value: '' },
  { title: '通用名(商品名)', id: 'commonName', value: '' },
  { title: '规格（特征、参数）', id: 'spec', value: '' },
  { title: '型号(剂型)', id: 'model', value: '' },
  { title: '描述', id: 'disc', value: '' },
  { title: '品牌', id: 'brand', value: '' },
  { title: '上市许可持有企业Pid', id: 'mahOrgPid', value: '' },
  { title: '上市许可持有企业社会编码', id: 'mahCode', value: '' },
  { title: '上市许可持有企业中文名', id: 'mahZh', value: '' },
  { title: '上市许可持有企业英文名', id: 'mahEn', value: '' },
  { title: '生产企业Pid', id: 'manufacturerOrgPid', value: '' },
  { title: '生产企业社会编码', id: 'manufacturerCode', value: '' },
  { title: '生产企业中文名称', id: 'manufacturerZh', value: '' },
  { title: '生产企业英文名称', id: 'manufacturerEn', value: '' },
  { title: '产地', id: 'origin', value: '' },
  { title: '产品类别', id: 'category', value: '' },
  { title: '计量单位', id: 'measurement', value: '' },
  { title: '药品本位码', id: 'sdc', value: '' },
  { title: '当前批准类型', id: 'approvalType', value: '' },
  { title: '当前注册证号/注册证号', id: 'approvalNum', value: '' },
  { title: '当前有效期始', id: 'approvalDate', value: '' },
  { title: '当前有效期止', id: 'validDate', value: '' },
  { title: '批准证照Pid', id: 'licencePid', value: '' },
  { title: '状态', id: 'state', value: '' },
  { title: '结算方式', id: 'settlement', value: '' },
  { title: '合同编码', id: 'acquisitionCode', value: '' },
  { title: '带量标识', id: 'bulkFlage', value: '' },
  { title: '缩略图', id: 'img', value: '' },
  { title: '照片1', id: 'img1', value: '' },
  { title: '照片2', id: 'img2', value: '' },
  { title: '照片3', id: 'img3', value: '' },
  { title: '参考价', id: 'price', value: '' }
]
